#include "tan_classobject.h"
#include "tan_alloc.h"

static const char* class_var_typename = "class";

static TanObjectType class_object_Type =
{
	0,		// type_new
	0,		// type_delete
	0,			// type_clear
	0,			// var_repr
	0,		// var_compare
	0,		// var_assign
	0,		// var_operation
	0,
	0				// next
};

TanObject* Tan_Class(TanObject* class_name, TANLIST(TanObject*) parent_class, TANLIST(TanObject*) functions)
{
	TanClassObject* var_object = (TanClassObject*)Tan_AllocObject_Memset(sizeof(TanClassObject));

	var_object->class_name = class_name;
	var_object->parent_class = parent_class;
	var_object->functions = functions;

	Tan_Object_cast(var_object)->object_set = &class_object_Type;
	Tan_Object_cast(var_object)->object_type = class_var_typename;

	return (TanObject*)var_object;
}
